import request from '@/utils/request'

export function getPermissionList(params) {
  return request({
    url: `/permissions`,
    method: 'get',
    params
  })
}

export function addPermisson(data) {
  return request({
    url: '/permissions',
    method: 'post',
    data
  })
}

export function getPermById(id) {
  return request({
    url: `/permissions/${id}`
  })
}

export function editPerm(data) {
  return request({
    url: `/permissions/${data.id}`,
    method: 'put',
    data
  })
}

export function delPerm(id) {
  return request({
    url: `/permissions/${id}`,
    method: 'delete'
  })
}
